package com.ygqh.baby.service;

import com.ygqh.baby.ao.Message;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.excel.domain.OrderDetailSendEntity;
import com.ygqh.baby.model.OrderSendDetailSearchParam;
import com.ygqh.baby.model.OrderSendParam;
import com.ygqh.baby.po.YgOrderSendDetail;

import java.util.Date;
import java.util.List;

public interface YgOrderSendDetailService {


    List<YgOrderSendDetail> findBySubIds(Long[] subIds);

    List<YgOrderSendDetail> findByOrderIds(Long[] subIds);

    int findCount();

    YgOrderSendDetail findById(Long id);

    int save(YgOrderSendDetail ygOrderSendDetail);

    int update(YgOrderSendDetail ygOrderSendDetail);

    int saveOrUpdate(YgOrderSendDetail ygOrderSendDetail);

    int addBatch(List<YgOrderSendDetail> detailList);

    ResultSet<YgOrderSendDetail> search(OrderSendDetailSearchParam sendDetailSearchParam);

    Message sendOrder(OrderSendParam sendParam);

    Message closeSendOrderDetail(Long id, String remark, String handler);

    List<YgOrderSendDetail> findList(OrderSendDetailSearchParam sendDetailSearchParam);

    Message sendOrderDetailBatch(List<OrderDetailSendEntity> sendList, String handler, Date updateTime);

    /**
     * 是否已拆分
     *
     * @param orderId 原订单编号
     * @return boolean
     */
    boolean existed(Long orderId);

    int updateNeedSendTime(Long detailId, Date sendTime, String trueName, String remark);

}
